from leetcode_test import *


class Solution:
    def inorderTraversal(self, root: TreeNode) -> List[int]:
        ans = []
        if not root:
            return []
        def helper(node):
            
            if node.left:
                helper(node.left)
            ans.append(node.val)
            if node.right:
                helper(node.right)
            
        helper(root)
        return ans

def test():
    t = TreeNode.create([1, None, 2, 3])
    assert Solution().inorderTraversal(t) == [1 ,3 ,2]

if __name__ == "__main__":
    t = TreeNode.create([1,2 ,3,4,5,6,7,8,9,10,11,12,13,14])
    print(Solution().inorderTraversal(t))
